package tests;

import java.sql.SQLException;
import java.util.List;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import utils.Config;
import database.Reader;
import database.UserManager;
import database.Writer;

public class WriterTests {
	
	private Reader reader;
	private Writer writer;
	private UserManager userManager;
	private Config config;
	
	@Before
	public void setup() {
		reader = new Reader();
		writer = new Writer();

	}
//	Assert.assertFalse(sponsors.contains("test company"));
//	Assert.assertEquals("NÃ£o Ã© o primeiro valor.", 1, pa.getPrimeiro());
//	Assert.assertNotSame("NÃ£o Ã© o primeiro valor.", "n", pa.getPrimeiro());

	
	@Test
	public void testWriteSponsor() throws SQLException, ClassNotFoundException{
		List<String> sponsors = reader.getSponsorsName();
		writer.writeSponsor("test company", 1234.0, "gold");
		sponsors = reader.getSponsorsName();
		Assert.assertTrue(sponsors.contains("test company"));
		
	}

}
